import { lazy } from "react";

const Layout = lazy(() => import("../layout"));
const Home = lazy(() => import("../views/home"));
const BasicData = lazy(() => import("../views/basicData"));
const Finance = lazy(() => import("../views/finance"));
const Stock = lazy(() => import("../views/stock"));
const Sales = lazy(() => import("../views/sales"));
const Purchase = lazy(() => import("../views/purchase"));

const routes = [
  {
    path: "/",
    element: <Layout />,
    children: [
      {
        path: "/home",//首页
        element: <Home />,
      },
      {
        path: "/basicData",//基础数据
        element: <BasicData />,
      },
      {
        path: "/finance", //财务管理
        element: <Finance />,
      },
      {
        path: "/stock", //采购管理
        element: <Stock />,
      },
      {
        path: "/sales", //销售管理
        element: <Sales />,
      },
      {
        path: "/purchase", //采购管理
        element: <Purchase />,
      },
    ],
  },
];

export default routes
